﻿@{
    ViewBag.Title = "ListProduct";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using MobileStore.Bussiness.Models
@{
    List<Product> Products = ViewData["Products"] as List<Product>;
}


<!--SIDE NAV STARTS-->
<div id="side_nav">
    @{Html.RenderAction("_PartialSidebarMenu", "Product", new { type = ViewBag.Type });}
</div>
<!--SIDE NAV ENDS-->

<!--MAIN CONTENT STARTS-->
<div id="main_content">
    <div class="category_banner"> <img src="@Url.Content("~/Images/promo_cat_banner.jpg")" /> </div>
    <ul class="breadcrumb">
        <li><a href="#">Home</a></li>
        <li><a href="#">Product</a></li>
    </ul>

    <!--Product List Starts-->
    <div id="products" class="products_list products_slider">
        <ul>

            @foreach (Product pr in Products)
            {
                <li>
                    <a class="product_image" href="@Url.Action("ViewDetail", "ProductDetail", new { ID = @pr.ProductID })"><img alt="@pr.Name" src="@Url.Content(pr.ImageSource)" /></a>
                    <div class="product_info">
                        <h3><a href="@Url.Action("ViewDetail", "ProductDetail",new {ID=@pr.ProductID})">@pr.Name</a></h3>
                        <small>@pr.Description</small>
                    </div>
                    <div class="price_info">
                        <button class="price_add" id="product-@pr.ProductID" title="" type="button"><span class="pr_price">@pr.ListedPrice.000</span><span class="pr_add" data-post-url="@Url.Action("AddToCart", "Cart")">Đặt mua</span></button>
                    </div>
                </li>
            }

        </ul>
    </div>
    <!--Product List Ends-->
</div>
<!--MAIN CONTENT ENDS-->